package com.example.demo.service;

import java.util.concurrent.Future;

import org.springframework.scheduling.annotation.AsyncResult;
import org.springframework.stereotype.Component;

import com.example.demo.model.Dto;

@Component
public class ServiceImpl implements Service {

	@Override
	public Future<Dto> test(Dto dto) {
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
		return new AsyncResult<Dto>(dto);
	}

}
